package data;

import model.Pharser;

public class ParameterNew {
	public enum Value {
		Very_Low,
		Low,
		Nominal,
		High,
		Very_High,
		Extra_High,
	}

	public String name;
	
	public double dvalue = -1;
	public int ivalue;
	
	public ParameterNew(double value){
		dvalue = value;
	}
	
	public ParameterNew(String key, String svalue) {
		Value value = Value.valueOf(svalue);
		switch (value) {
		case Very_Low:
			dvalue = 1;
			break;

		case Low:
			dvalue = 2;
			break;
			
		case Nominal:
			dvalue = 3;
		
		case High:
			dvalue = 4;
		
		case Very_High:
			dvalue = 5;
			
		case Extra_High:
			dvalue = 6;
		default:
			break;
		}
		dvalue = Pharser.parameterValues.get(key)[(int)dvalue];
	}
}
